 ALTER     PROC SP_SAVE_AMKOR_TEST_BINNING_INFO (
 	@DEVICE_NAME			VARCHAR (50),
 	@LOT_NUMBER			VARCHAR (50),
 	@WAFER_ID			VARCHAR (50),
 	@DATE_IN			VARCHAR (50),
 	@BIN_NUMBER			VARCHAR (50),
 	@BIN_QTY			VARCHAR (50),
 	@CURRENT_DATE			VARCHAR (50),
	@BIN_TYPE			VARCHAR (50)
         )
 	
 	AS
 	BEGIN
 		DECLARE @DATE_TIME DATETIME 
      		DECLARE @START_DATE DATETIME 
      		DECLARE @END_DATE DATETIME 
 		DECLARE @TIME_STAMP DATETIME 
      		DECLARE @TEMP_VARCHAR VARCHAR(20)
 		
 		SET @TEMP_VARCHAR = CONVERT(VARCHAR, CURRENT_TIMESTAMP, 101)+' 12:00AM'
      		SET @START_DATE = CONVERT(VARCHAR (50), @TEMP_VARCHAR)
      		SET @TEMP_VARCHAR = NULL
      		SET @TEMP_VARCHAR = CONVERT(VARCHAR, CURRENT_TIMESTAMP, 101)+' 11:59PM' 
      		SET @END_DATE = CONVERT(VARCHAR (50), @TEMP_VARCHAR)
 
 		INSERT INTO AMKOR_TEST_BINNING_TABLE( DEVICE_NAME,LOT_NUMBER,WAFER_ID,DATE_IN,BIN_NUMBER,BIN_QTY,ADAPTOR_DATE,TIMESTAMP,BIN_TYPE )    
 			VALUES(@DEVICE_NAME,@LOT_NUMBER,@WAFER_ID,@DATE_IN,@BIN_NUMBER,@BIN_QTY,@CURRENT_DATE,CURRENT_TIMESTAMP,@BIN_TYPE)
 		
 		INSERT INTO AMKOR_TEST_BINNING_HISTORY_TABLE( DEVICE_NAME,LOT_NUMBER,WAFER_ID,DATE_IN,BIN_NUMBER,BIN_QTY,ADAPTOR_DATE,TIMESTAMP,BIN_TYPE )    
 			VALUES(@DEVICE_NAME,@LOT_NUMBER,@WAFER_ID,@DATE_IN,@BIN_NUMBER,@BIN_QTY,@CURRENT_DATE,CURRENT_TIMESTAMP,@BIN_TYPE)
 	END


